package bx.job.jobrouter;

import bx.job.entity.BxJobInfo;
import bx.job.entity.BxJobWorkerInfo;
import bx.job.entity.BxTriggerInfo;
import com.google.common.collect.Maps;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;

public interface IJobWorkerRouter {
    List<WorkerJobBindInfo> jobRoute(WorkerRouterContext workerRouterContext);


    @Builder
    @Data
    class WorkerRouterContext {
        private BxJobInfo bxJobInfo;
        private BxTriggerInfo triggerInfo;
        private List<BxJobWorkerInfo> workerInfoList;
    }

    @Builder
    @Data
    class WorkerJobBindInfo {
        private BxJobInfo bxJobInfo;
        private BxJobWorkerInfo bxJobWorkerInfo;
        private String argsStr;
    }
}
